package org.dinnermate.staff;

import java.sql.SQLException;

import net.java.ao.Entity;
import net.java.ao.Implementation;
import net.java.ao.ManyToMany;
import net.java.ao.Preload;
import net.java.ao.schema.TableName;
import net.java.ao.schema.Unique;

import org.dinnermate.db.MapClass;

@TableName("StaffMember")
@Implementation(StaffMemberImpl.class)
@MapClass(ShiftToStaff.class)
@Preload()
public interface StaffMember extends Entity
{
	@Unique
	public String getUserName();

	@Unique
	public void setUserName( String userName );

	public String getPassword();

	public void setPassword( String password );

	public String getFirstName();

	public void setFirstName( String firstName );

	public String getLastName();

	public void setLastName( String lastName );

	public Position getPosition();

	public void setPosition( Position position );

	public float getWage();

	public void setWage( float wage );

	public String getAddress();

	public void setAddress( String address );

	public String getPhoneNumber();

	public void setPhoneNumber( String phoneNumber );

	public String getEmail();

	public void setEmail( String email );

	public String getDetails();

	public void setDetails( String details );
	
	@ManyToMany(ShiftToStaff.class)
	public Shift[] getShifts();
	
	/**
	 * First and last name combined with a space.
	 * @return	First and last name combined with a space.
	 */
	public String getFullName();
	
	/**
	 * Set first and last name by splitting input at first " " character
	 * @param fullName	The person's full name, ie. Jeff Wallace.
	 */
	public void setFullName(String fullName);
	
	public void deleteMaps() throws SQLException;
}
